# What does a caret mean in a Type Annotation?

**URL:** <https://forums.fsharp.org/t/what-does-a-caret-mean-in-a-type-annotation/3336>\
**Category:** General\
**Created:** [September 11, 2023, 5:11am UTC](https://forums.fsharp.org/t/what-does-a-caret-mean-in-a-type-annotation/3336 "2023-09-11T05:11:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shanoaice](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/shanoaice/32/1246_2.png) [@shanoaice](https://forums.fsharp.org/u/shanoaice)\
**Post date:** [September 11, 2023, 5:11am UTC](https://forums.fsharp.org/t/what-does-a-caret-mean-in-a-type-annotation/3336/1 "2023-09-11T05:11:14Z")

</div>

I sometimes see type annotations like this:

```plaintext
'a -> ^b
'a option -> ^d

```

I am slightly confused by the `^` symbol in this kind of type annotation, what is that?

---

<div class="post-metadata">

**Author:** ![ntwilson](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/ntwilson/32/984_2.png) [@ntwilson](https://forums.fsharp.org/u/ntwilson)\
**Post date:** [September 11, 2023, 1:28pm UTC](https://forums.fsharp.org/t/what-does-a-caret-mean-in-a-type-annotation/3336/2 "2023-09-11T13:28:41Z")

</div>

The `^` is used instead of the `'` for [Statically Resolved Type Parameters](https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/generics/statically-resolved-type-parameters) or SRTP for short. Note that in F# 7, a lot of effort was made to make SRTP a lot more ergonomic for use, and part of that was to make the `'` work at least most of the time for SRTP as well as for “normal” generics. So nowadays, `^` can often be replaced with `'`. As a short answer, you can probably just think of your examples as `'a -> 'b` and `'a option -> 'd`. A quick example of SRTP in action might look like

```auto
let inline getName (thingWithName : ^a when ^a : (member Name : string)) =
  thingWithName.Name

type Person = { Name : string; Age : int }
type Pet = { Name : string; Owner : Person }

let scott = { Name = "Scott"; Age = 30 }
let fido = { Name = "Fido"; Owner = scott }

printfn "%s" (getName scott)
printfn "%s" (getName fido)

```

Note that I can pass either a `Person` or a `Pet` into `getName` even though they’re different types and don’t share an interface because of SRTP.

---

<div class="post-metadata">

**Author:** ![Prash](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/prash/32/815_2.png) [@Prash](https://forums.fsharp.org/u/Prash)\
**Post date:** [September 11, 2023, 6:59pm UTC](https://forums.fsharp.org/t/what-does-a-caret-mean-in-a-type-annotation/3336/3 "2023-09-11T18:59:04Z")

</div>

In future you might find the F# [Symbol and operator reference](https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/symbol-and-operator-reference/) useful for syntax that’s hard to search for.
