Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. (***********)
  2. (* IMPORTS *)
  3. (***********)
  4. Require Import Coq.Arith.PeanoNat.
  5. Require Import Coq.Lists.List.
  6. Require Import Coq.Strings.String.
  7. Require Import Coq.Strings.Ascii.
  8.  
  9. (**********)
  10. (* strchr *)
  11. (**********)
  12. Fixpoint strchr (haystack : string) (needle : ascii) : string :=
  13. match haystack with
  14. | EmptyString => EmptyString
  15. | String c s' => match (Ascii.eqb needle c) with
  16. | true => s
  17. | false => strchr s' needle
  18. end
  19. end.
  20.  
  21. (********************************)
  22. (* Extraction Language: Haskell *)
  23. (********************************)
  24. Extraction Language Haskell.
  25.  
  26. (***************************)
  27. (* Extract to Haskell file *)
  28. (***************************)
  29. Extraction "/home/oren/GIT/kMemLoops/strchr.hs" strchr.
  30.  
  31. Error: The reference Ascii.eqb was not found in the current environment.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement