Skip to content

Instantly share code, notes, and snippets.

@zraffer
Last active Jul 25, 2019
Embed
What would you like to do?
{-# OPTIONS --without-K --safe --no-sized-types --no-guardedness #-}
module Agda.Builtin.FromString where
open import Agda.Primitive
open import Agda.Builtin.String
record IsString {a} (A : Set a) : Set (lsuc a) where
field
Constraint : String Set a
fromString : (s : String) {{_ : Constraint s}} A
open IsString {{...}} public using (fromString)
{-# BUILTIN FROMSTRING fromString #-}
{-# DISPLAY IsString.fromString _ s = fromString s #-}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment